package com.gxa.ehome.entity;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author: fanyouzhao
 * @Date: 9:24 2021/5/10
 */
public class Cp implements Serializable {
    private Integer id;
    private String name;
    private String desc;
    private String img;
    private String role;
    // 如果存在时间日期类型的字段,也可以利用JSONField进行格式化处理
   /* @JSONField(format = "YYYY-MM-dd HH:mm:ss")
    private Date regDate;*/

    @JSONField(format = "YYYY-MM-dd HH:mm:ss")
    private Date colletExpire;
    @JSONField(format = "YYYY-MM-dd HH:mm:ss")
    private Date useExpire;
    private boolean inUse;

    public Cp() {
    }

    public Cp(Integer id, String name, String desc, String img, String role, Date colletExpire, Date useExpire, boolean inUse) {
        this.id = id;
        this.name = name;
        this.desc = desc;
        this.img = img;
        this.role = role;
        this.colletExpire = colletExpire;
        this.useExpire = useExpire;
        this.inUse = inUse;
    }

    public Cp( String name, String desc, String img, String role, Date colletExpire, Date useExpire, boolean inUse) {
        this.name = name;
        this.desc = desc;
        this.img = img;
        this.role = role;
        this.colletExpire = colletExpire;
        this.useExpire = useExpire;
        this.inUse = inUse;
    }

    @Override
    public String toString() {
        return "Cp{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", desc='" + desc + '\'' +
                ", img='" + img + '\'' +
                ", role='" + role + '\'' +
                ", colletExpire=" + colletExpire +
                ", useExpire=" + useExpire +
                ", inUse=" + inUse +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getDesc() {
        return desc;
    }

    public String getImg() {
        return img;
    }

    public String getRole() {
        return role;
    }

    public Date getColletExpire() {
        return colletExpire;
    }

    public Date getUseExpire() {
        return useExpire;
    }

    public boolean isInUse() {
        return inUse;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public void setColletExpire(Date colletExpire) {
        this.colletExpire = colletExpire;
    }

    public void setUseExpire(Date useExpire) {
        this.useExpire = useExpire;
    }

    public void setInUse(boolean inUse) {
        this.inUse = inUse;
    }
}
